import { Controller, Post, UploadedFile, UseInterceptors } from '@nestjs/common'
import { UploadService } from './upload.service'
import { Upload } from './upload.decorator'

@Controller('upload')
export class UploadController {
   constructor(private readonly uploadService: UploadService) {}
   @Post()
   @Upload('file', 'image')
   uploadFile(@UploadedFile() file: Express.Multer.File) {
      return this.uploadService.uploadFile(file)
   }
}
